const { model } = require('../db/core/index');

/**
 * Patient model
 */
const Patient = model('Patient', {
    id: {
        type: String,
        required: true,
        unique: true,
    },
    name: String,
    age: Number,
    gender: String,
    address: String,
    phone: String,
    email: String,
    occupation: String,
    maritalStatus: String,
    religion: String,
    bloodGroup: String,
    allergies: String,
    medications: String,
    diagnosis: String,
    notes: String,
    createdBy: String,
    createdAt: {
        type: Date,
        default: Date.now,
    },
    updatedAt: {
        type: Date,
        default: Date.now,
    },
})

module.exports = {
    Patient,
}